/* eslint-disable */
import * as Request from '@/api/liubike';
import {config} from "@/api/config"
import { Toast, Dialog } from "mand-mobile";
import store from "@/tools/factory"
import { TMap } from "../../tools/Tmap";
let that = null;
let loginInfo = null;

export default {
    components: {
        [Dialog.name]: Dialog
    },
    data() {
        return {
            userInfo: {}
        }
    },
    mounted() {
        that = this;
        that.getUserCenter()
    },
    methods: {
        getUserCenter() {
            Request.getUserCenter().then(res => {
                if (res.success) {
                    that.userInfo = res.data;
                }
            })
        },
        exit() {
            Dialog.confirm({
                title: '温馨提示',
                content: '你确定要退出当前账号吗？',
                confirmText: '确定',
                onConfirm: function () {
                    store.remove("loginInfo");
                    store.remove("token");
                    store.remove("orderNo");
                    store.remove("rideInfo");
                    that.$router.back(-1)
                }
            })
        },
    }
}
